//
//  HHVideoMessageCellData.h
//  HHChatKit
//
//  Created by Henry on 2021/6/3.
//

#import "HHMessageCellData.h"

NS_ASSUME_NONNULL_BEGIN

/// 视频
@interface HHVideoItem : NSObject

@property (nonatomic, strong) NSString *uuid;
@property (nonatomic, strong) NSString *type;
@property (nonatomic, strong) NSString *url;

@property (nonatomic) NSInteger length;
@property (nonatomic) NSInteger duration;

- (NSString *)getName;
- (NSString *)getPath:(NSString *)convId;

- (void)downloadPath:(NSString *)path progress:(HHDownloadProgress)progress succ:(HHSucc)succ fail:(HHFail)fail;

@end

/// 封面
@interface HHSnapshotItem : NSObject

@property (nonatomic, strong) NSString *uuid;
@property (nonatomic, strong) NSString *type;
@property (nonatomic, strong) NSString *url;

@property (nonatomic) CGSize size;
@property (nonatomic) NSInteger length;

- (NSString *)getName;
- (NSString *)getPath:(NSString *)convId;

- (void)downloadPath:(NSString *)path progress:(HHDownloadProgress)progress succ:(HHSucc)succ fail:(HHFail)fail;

@end

@interface HHVideoMessageCellData : HHMessageCellData

@property (nonatomic, strong) UIImage *thumbImage;
@property (nonatomic, strong) NSString *videoPath;
@property (nonatomic, strong) NSString *snapshotPath;

@property (nonatomic, strong) HHVideoItem *videoItem;
@property (nonatomic, strong) HHSnapshotItem *snapshotItem;

@property (nonatomic, assign) NSUInteger uploadProgress;
@property (nonatomic, assign) NSUInteger thumbProgress;
@property (nonatomic, assign) NSUInteger videoProgress;

- (void)loadThumb;
- (void)loadVideo;

@end

NS_ASSUME_NONNULL_END
